//
//  ZBPaymentManager.h
//  dushuhu
//
//  Created by zhangbin on 8/30/14.
//  Copyright (c) qianfeng. All rights reserved.
//

#import <Foundation/Foundation.h>


#define ZBPaymentKeySuccess @"PaymentKeySuccess"
#define ZBPaymentKeyType @"PaymentKeyType"
#define ZBPaymentKeyAlipayMobile @"PaymentKeyAlipayMobile"

#define ZBPAYMENT_NOTIFICATION_AFTER_PAY_IDENTIFIER @"ZBPAYMENT_NOTIFICATION_AFTER_PAY_IDENTIFIER"

typedef NS_ENUM(NSInteger, ZBPaymentType) {
	ZBPaymentTypeWeixin,
	ZBPaymentTypeAlipay,
	ZBPaymentTypeCount
};

/// ZBPaymentManager 支付管理.
@interface ZBPaymentManager : NSObject

+ (instancetype)shared;


- (void)weixinPayPrice:(NSString *)price
               orderID:(NSString *)orderID
             partnerID:(NSString *)partnerID
                 appID:(NSString *)appID
                appKey:(NSString *)appKey
              prepayID:(NSString *)prepayID
           nonceString:(NSString *)nonceString
       timestampString:(NSString *)timestampString
               package:(NSString *)package
                  sign:(NSString *)sign;

- (void)pay:(ZBPaymentType)type
      price:(NSString *)price
    orderID:(NSString *)orderID
       name:(NSString *)name
description:(NSString *)description
callbackURLString:(NSString *)callbackURLString
  withBlock:(void (^)(BOOL success))block;

- (void)afterPay:(ZBPaymentType)type withURL:(NSURL *)url;

@end
